﻿namespace Assets.FlowField
{
    public static class DirectionHelper
    {
        public static float GetEulerZ(Direction direction)
        {
            return (float) direction;
        }

        public static Direction GetReverse(Direction direction)
        {
            var eulerZ = (int)direction;
            eulerZ -= 180;
            if (eulerZ < 0)
            {
                eulerZ += 360;
            }

            return (Direction)eulerZ;
        }
    }
}